package com.itheima.demo02;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo {

    public static void main(String[] args) throws IOException {

        //创建对象
        InputStream inputStream = new FileInputStream("day10\\b.txt");

        //读取数据
        /*int read = inputStream.read();
        while (read!=-1) {
            System.out.println((char) read);
             read = inputStream.read();
        }*/

        int a = -1;
        while ((a=inputStream.read())!=-1){
            System.out.println((char)a);
        }


        //释放资源
        inputStream.close();
    }
}
